import {goods,} from './axios'

export function inser_goods(iid,imgURL,title,desc,newPrice){
    console.log(iid,imgURL,title,desc,newPrice);
    return goods({
        url:'/inser_goods',
        method:'POST',
        data:{
            iid,imgURL,title,desc,newPrice
        }
  })
}

export function user_by_goods(iid,num){
    let token = sessionStorage.getItem('token')
    return goods({
        headers: { authorization:token},
        url:'/user_buy_goods',
        method:'POST',
        data:{
            iid,num,
        }
    })
}